<?php
  /*ELABORO: KARYNA ROSALES BOTELLO*/
  /*MODULO DE SUSCRIPCION DE USUARIO*/
   INCLUDE "F_CONX.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
function valida(formulario)
	{
	  if (document.FORM.V_DIV.value=="X")
	  {
	  	window.alert("SELECCINA TU DIVISION...");
		return false;
	  }
	  else
	  {
	    document.FORM.action="C_SUSP.php";
		return true;
	  }
    }
</script>
<LINK rel="stylesheet" type="text/css" href="STYLES.css">
</head>
<body>
<?PHP
  $MS_SQL    = "SELECT * FROM areas WHERE clave like '%000' and suscrito != 'y'";
  $MS_RESULT = MYSQL_QUERY($MS_SQL);
  $MS_NUM    = MYSQL_NUM_ROWS($MS_RESULT);
  IF ($MS_NUM > 0)
  {
     $V_OUT="<BR><BR><BR>";
     $V_OUT.="<FORM ACTION ='' METHOD='POST' NAME='FORM' OnSubmit='return valida(this)'>
              <TABLE WIDTH='800' BORDER='0' ALIGN='CENTER'>
		      <TR><TD ALIGN='CENTER' VALIGN='BASELINE' CLASS='SUBTIT'> DIVISION:
                  <SELECT NAME='V_DIV' CLASS='TXTSEL'>
                    <OPTION VALUE='X'>SELECCIONA TU DIVISION</OPTION>";
	 WHILE($A_AREAS = MYSQL_FETCH_ARRAY($MS_RESULT))
     {
        $V_OUT.="<OPTION VALUE='$A_AREAS[0]'>$A_AREAS[1]</OPTION>";
     }
     $V_OUT.="</SELECT></TD>";
     $V_OUT.="<TD WIDTH='380' HEIGHT='253' ALIGN='CENTER' VALIGN='BASELINE' CLASS='SUBTIT' ROWSPAN='2' BACKGROUND='imagenes/select.jpg'></TD></TR>";
     $V_OUT.="<TR><TD ALIGN='CENTER' VALIGN='BASELINE'>
		          <INPUT NAME='BTN_CONTINUAR' TYPE='SUBMIT' VALUE='CONTINUAR...'>
              </TD></TR>";
     $V_OUT.="</TABLE></FORM>";
     ECHO $V_OUT;
  }
  ELSE
    HEADER ("LOCATION: INDEX_.php");
?>
</body>
</html>
